// pages/plugins//projects-manager-details/stage-details/index.js、
const app = getApp();
const { AskPage } = app._require("common/index");
import { staticUrl } from "../../../../services/config.js";
AskPage({
    /**
     * 页面的初始数据
     */
    data: {
        dataList: {},
        title: "",
        imgList: [],
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function () {
        const res = wx.getStorageSync("queryData");
        const data = JSON.parse(res);
        const imgList = data.item.resImgList;
        const resImgList = [];
        if (imgList.length > 0) {
            imgList.forEach(subItem => {
              const el = staticUrl + '/' + subItem;
                resImgList.push(el);
            });
        }
        this.setData({
            dataList: data.item,
            title: data.title,
            imgList: resImgList,
        });
    },
    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {},
    viewMoviePostImg: function (e) {
        var index = e.currentTarget.dataset.index;
        var imgArr = this.data.imgList;
        wx.previewImage({
            urls: imgArr, //需要预览的图片http链接列表，注意是数组
            current: "", // 当前显示图片的http链接，默认是第一个
            success: function (res) {},
            fail: function (res) {},
            complete: function (res) {},
        });
    },
});
